import java.util
        .concurrent.locks.ReentrantLock;

/**
 * 〈一句话功能简述〉<br>
 * 〈〉
 *
 * @author shilinghuai
 * @create 2022/4/3
 * @since 1.0.0
 */
public class BinaryFind {
    public static void main(String[] args){
        int[] ia = {1,3,5,7,9};


    }
    public static int binary (int[] ia,int midIndex,int targe,int left ,int right){
                            if(left==right){
                                return left;
                            }
                            if(targe > ia[midIndex]){
                                return binary(ia,((left+right)/2+1+right)/2,targe,(left+right)/2+1,right);
                            }else if(targe < ia[midIndex]){
                                return binary(ia,((left+right)/2-1+left)/2,targe,left,(left+right)/2-1);
                            }else {
                                return midIndex;
                            }
    }
}
